﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Gear.ToolKits.Base.PageFactor
{
    /// <summary>
    /// 查询条件
    /// </summary>
    public class DataFilter
    {
        /// <summary>
        /// 查询字段
        /// </summary>
        public string FilterName { get; set; }
        /// <summary>
        /// 查询值
        /// </summary>
        public string FilterValue { get; set; }
        /// <summary>
        /// 字段类型
        /// </summary>
        public FilterType FilterType { get; set; }
        /// <summary>
        /// 查询规则
        /// </summary>
        public ExpressionType ExpressionType { get; set; }
    }
    /// <summary>
    /// 字段类型
    /// </summary>
    public enum FilterType
    {
        /// <summary>
        /// 字符
        /// </summary>
        String,
        /// <summary>
        /// 数字
        /// </summary>
        Int,
        /// <summary>
        /// 长数字
        /// </summary>
        Long,
        /// <summary>
        /// 布尔
        /// </summary>
        Boolean
    }
    /// <summary>
    /// 查询规则
    /// </summary>
    public enum ExpressionType
    {
        /// <summary>
        ///  like
        /// </summary>
        Contains,
        /// <summary>
        /// 等于
        /// </summary>
        Equal,
        /// <summary>
        /// 小于
        /// </summary>
        LessThan,
        /// <summary>
        /// 小于等于
        /// </summary>
        LessThanOrEqual,
        /// <summary>
        /// 大于
        /// </summary>
        GreaterThan,
        /// <summary>
        /// 大于等于
        /// </summary>
        GreaterThanOrEqual
    }
}
